home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / appletalk / netatalk / afs / afsprivsrc.sit.hqx / AFS Privileges 1.50 / widemdef.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-21  |  1.2 KB  |  57 lines

  1. #include    <Types.h>
  2. #include    <Files.h>
  3. #include    <Devices.h>
  4. #include    <Quickdraw.h>
  5. #include    <OSUtils.h>
  6. #include    <Dialogs.h>
  7. #include    <Desk.h>
  8. #include     <Icons.h>
  9. #include    <Errors.h>
  10. #include    <Resources.h>
  11. #include     <Lists.h>
  12. #include    <Memory.h>
  13. #include    <SysEqu.h>
  14. #include    <Packages.h>
  15. #include    <ToolUtils.h>
  16. #include    <StdIO.h>
  17. #include    <String.h>
  18. #include    <Menus.h>
  19. #include     <Sound.h>
  20. #include    <Traps.h>
  21. #include     <Windows.h>
  22. #include    <Quickdraw.h>
  23. #include    "Protos.h"
  24. #include    "AShare.h"
  25.  
  26. #include    "privileges.h"
  27.  
  28. #pragma segment widemenumdef
  29.  
  30. pascal void
  31. widemenu( msg, menuh, rp, top, left, itemp )
  32.     short        msg;
  33.     MenuHandle    menuh;
  34.     Rect        *rp;
  35.     short        top, left;
  36.     short        *itemp;
  37. {
  38.     typedef    pascal void MDEFfunction ( short, MenuHandle, Rect *, short, short, short * );
  39.     Handle        textmdef;
  40.     Byte        hstate;
  41.             
  42.     if (( textmdef = GetResource( 'MDEF', textMenuProc )) == NULL ) {
  43.         return;
  44.     }
  45.     hstate = HGetState( textmdef );
  46.     HLock( textmdef );    
  47.     
  48.     (*(MDEFfunction *)*textmdef)( msg, menuh, rp, top, left, itemp );
  49.  
  50.     if ( msg == mSizeMsg ) {
  51.         /*
  52.          * adjust horizontal size to add room for arrow on the right
  53.          */
  54.         (*menuh)->menuWidth += ( SIZEOFSICN / 2 );
  55.     }
  56.     HSetState( textmdef, hstate );
  57. }